<template>
    <!-- 未设置业务名片弹窗 -->
    <div 
    class="hint-one"
	v-show="isShow && overlayShow">
        <div class="hint-one-text-div">
            <div>{{textOne}}</div>
            <div v-if="textSecond">{{textSecond}}</div>
        </div>
        <div class="hint-one-btn-div">
            <a @click="hideOverlay" class="hint-one-btn hint-one-btn-close">{{closeBtnText}}</a>
            <a @click="toBus" id="to-set-business" class="hint-one-btn hint-one-btn-sure">{{sureBtnText}}</a>
        </div>
    </div>
</template>

<script>
import { enterUserSet } from '_projectFn/page'

export default {
    name: 'NeedSetBusWindow',
    props: {
        textOne: {
            type: String,
            default: '请1分钟发布您的供应和需求',
        },
        textSecond: {
            type: String,
            default: '',
        },
        closeBtnText: {
            type: String,
            default: '关闭'
        },
        sureBtnText: {
            type: String,
            default: '1分钟发布'
        },
        isShow: {
            type: Boolean,
            default: false
        },
        overlayShow: {
            type: Boolean,
            default: false
        },
    },
    methods: {
        hideOverlay() {
            this.$emit('hideOverlay')
        },
        toBus() {
            enterUserSet('business')
        }
    },
    deactivated() {
        this.hideOverlay()
    },
}
</script>

<style lang="scss" scoped>
.hint-one {
    width: 290px;
    height: 170px;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: -145px;
    margin-top: -85px;
    z-index: 2;
    background: white;
    border-radius: 5px;
    overflow: hidden;

    .hint-one-close {
        position: absolute;
        top: 6px;
        right: 6px;
        color: #999999;
    }

    .hint-one-text-div {
        height: 130px;
        width: 100%;
        display: -webkit-flex;
        display: flex;
        justify-content: center;
        align-items: center;
        border-bottom: 1px solid #eeeeee;
        padding: 15px;
        flex-direction: column;
        color: #333333;
        text-align: center;
    }

    .hint-one-btn-div {
        height: 40px;
        width: 100%;
        display: -webkit-flex;
        display: flex;
    
        .hint-one-btn {
            display: -webkit-flex;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
        }
        
        .hint-one-btn-close {
            color: #999999;
            width: 90px;
        }
        
        .hint-one-btn-sure {
            background: #0077bf;
            color: white;
            width: 200px;
        }
    }
}
</style>